package com.dixon.worddayday.config;

import com.dixon.worddayday.response.ResponseCode;

/**
 * 业务异常
 * @author dixon.zhang
 *
 */
public class BusinessException extends RuntimeException {
	private static final long serialVersionUID = 1689262554811965152L;

	private String code;
	
	public BusinessException() {
	}
	
	public BusinessException(String message){
		super(message);
		this.code = ResponseCode.BUSINESS_EXCEPTION.getCode();
	}
	
	public BusinessException(String message, String code){
		super(message);
		this.code = code;
	}
	public BusinessException(ResponseCode rc){
		super(rc.getDesc());
		this.code = rc.getCode();
	}

	public String getCode() {
		return code;
	}
}
